<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/3/20
 * Time: 18:13
 */
namespace app\index\model;

use think\Model;

class User extends Model
{
    public function getUserList()
    {
        return $this->query('SELECT u.id,u.name FROM user u INNER JOIN api a ON a.user_id=u.id WHERE u.status=1 AND a.status=1 GROUP BY u.id ORDER BY u.id DESC ');
    }
}